import type { MenuItem } from '@/api/model/menuModel';
import { request } from '@/utils/request';

const Api = {
  GetUserMenus: '/admin/menu',
  CreateDefaultMenus: '/admin/menu/default',
};

export function getUserMenus() {
  return request.get<{ menus: MenuItem[] }>({
    url: Api.GetUserMenus,
  });
}

export function createDefaultMenus(tenantId: number) {
  return request.post({
    url: Api.CreateDefaultMenus,
    params: { tenantId },
  });
}